package com.jhd.fuzhou.view.receipt;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.content.Context;
import android.os.Bundle;

import com.alibaba.fastjson.JSON;
import com.jhd.fuzhou.R;
import com.jhd.fuzhou.adapter.ReceiptDocumentAdapter;
import com.jhd.fuzhou.adapter.TaskDocumentAdapter;
import com.jhd.fuzhou.util.CustomToast;
import com.jhd.fuzhou.view.login.BaseActivity;
import com.jhd.fuzhou.vo.ArchivesFileVo;
import com.jhd.fuzhou.vo.SuperviseEnclosureVo;
import com.jhd.fuzhou.vo.SupervisionInspectionVo;

import java.io.File;
import java.util.List;

import butterknife.BindView;

public class ReceiptDocumentActivity extends BaseActivity {

    @BindView(R.id.recyclerView)RecyclerView recyclerView;
    private Context context=this;
    private List<ArchivesFileVo> archivesFileVoList;
    @Override
    protected void loadViewLayout() {
        setContentView(R.layout.activity_document);
    }

    @Override
    protected void processLogic() {
        onBack();
        String data=getIntent().getStringExtra("data");
        archivesFileVoList= JSON.parseArray(data, ArchivesFileVo.class);
        if(archivesFileVoList!=null&&archivesFileVoList.size()>0){
            LinearLayoutManager linearLayoutManager=new LinearLayoutManager(context);
            recyclerView.setLayoutManager(linearLayoutManager);
            ReceiptDocumentAdapter adapter=new ReceiptDocumentAdapter(archivesFileVoList,context);
            recyclerView.setAdapter(adapter);
        }else{
            CustomToast.showText(context,"没有上传相关文书!",3000,0,0).show();
        }
    }
}